package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbChatPageMapper;
import com.ruoyi.system.domain.TbChatPage;
import com.ruoyi.system.service.ITbChatPageService;

/**
 * chatPageService业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-23
 */
@Service
public class TbChatPageServiceImpl implements ITbChatPageService 
{
    @Autowired
    private TbChatPageMapper tbChatPageMapper;

    /**
     * 查询chatPage
     * 
     * @param userId chatPage主键
     * @return chatPage
     */
    @Override
    public TbChatPage selectTbChatPageByUserId(Long userId)
    {
        return tbChatPageMapper.selectTbChatPageByUserId(userId);
    }

    /**
     * 查询chatPage列表
     * 
     * @param tbChatPage chatPage
     * @return chatPage
     */
    @Override
    public List<TbChatPage> selectTbChatPageList(TbChatPage tbChatPage)
    {
        return tbChatPageMapper.selectTbChatPageList(tbChatPage);
    }

    /**
     * 新增chatPage
     * 
     * @param tbChatPage chatPage
     * @return 结果
     */
    @Override
    public int insertTbChatPage(TbChatPage tbChatPage)
    {
        return tbChatPageMapper.insertTbChatPage(tbChatPage);
    }

    /**
     * 修改chatPage
     * 
     * @param tbChatPage chatPage
     * @return 结果
     */
    @Override
    public int updateTbChatPage(TbChatPage tbChatPage)
    {
        return tbChatPageMapper.updateTbChatPage(tbChatPage);
    }

    /**
     * 批量删除chatPage
     * 
     * @param userIds 需要删除的chatPage主键
     * @return 结果
     */
    @Override
    public int deleteTbChatPageByUserIds(Long[] userIds)
    {
        return tbChatPageMapper.deleteTbChatPageByUserIds(userIds);
    }

    /**
     * 删除chatPage信息
     * 
     * @param userId chatPage主键
     * @return 结果
     */
    @Override
    public int deleteTbChatPageByUserId(Long userId)
    {
        return tbChatPageMapper.deleteTbChatPageByUserId(userId);
    }
}
